{{define "login.html"}}
    <html>
    <head>
        <meta charset="UTF-8">
        <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
        <link rel="stylesheet" href="/res/css/reset.css">
        <link rel="stylesheet" href="/res/css/common.css">
        <link rel="stylesheet" href="/res/css/login.css">
        <link rel="stylesheet" href="/res/plugins/toastr/toastr.min.css">
        <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
        <script src="/res/bower_components/jquery/dist/jquery.min.js"></script>

        <script src="/res/plugins/toastr/toastr.min.js"></script>
        <title>郑州市第一人民医院脑卒中危险因素筛查系统</title>
    </head>
    <body>
    <div class="header w1200">
        <div class="logo">
            <img src="/res/images/logo.png" alt="郑州市第一人民医院">
        </div>
    </div>
    <!-- header end -->

    <!-- nav start -->
    <div class="nav">
        <img class="bgi" src="/res/images/bgi-login.png" alt="">
        <div class="w1200">
            <p class="system_name">脑卒中危险因素筛查系统</p>
            <form class="form-horizontal" action="/login" method="post" onsubmit="return check(this)">
                <div class="login">
                    <p class="title">管理后台登录</p>
                    <div class="login_info">
                        <input type="text" name="account" placeholder="请输入账号">
                        <input type="password" name="password" placeholder="请输入密码">
                        <div class="v_code">
                            <input type="text" name="_captcha" id="_captcha" placeholder="请输入验证码">
                            <img id="captcha" alt="点击刷新" src="/captcha" onClick="reLoadCaptcha();">
                        </div>
                    </div>
                    <div class="login_button">
                        <button type="submit">登录</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!-- nav end -->

    <!-- footer start -->
    <div class="footer w1200">
        <p>国家三级甲等综合医院</p>
        <p>国家药物临床试验机构</p>
    </div>
    <script>

        $(function () {

            /*toastr.error('今天中午12:30-13点之间服务器停机维护30分钟,期间请勿录入数据!', '重要通知:', {
                "progressBar": true,
                "positionClass": "toast-top-center",
                "timeOut": "20000",
                "closeButton": true
            });*/


            let msg ={{.msg}}
            if (msg && msg != null && msg != "") {
                toastr.warning(msg, '提示', {
                    "progressBar": true,
                    "positionClass": "toast-top-center",
                    "timeOut": "5000",
                    "closeButton": true
                });
            }
        });

        function check(form) {
            if (form.account.value == "") {
                toastr.warning("账户不能为空", '提示', {
                    "progressBar": true,
                    "positionClass": "toast-top-center",
                    "timeOut": "3000",
                    "closeButton": true
                });
                return false;
            }
            if (form.password.value == "") {
                toastr.warning("密码不能为空", '提示', {
                    "progressBar": true,
                    "positionClass": "toast-top-center",
                    "timeOut": "3000",
                    "closeButton": true
                });
                return false;
            }
            return true;
        }

        function reLoadCaptcha() {
            document.getElementById('captcha').src = '/captcha?rnd=' + Math.random();
        }
    </script>
    </body>
    </html>
{{end}}